﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfMyChargeLedgerLog.aspx.cs" Inherits="msBsc.WebUi.wfMyChargeLedgerLog" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server">
    <title>商家交易账单记录</title>
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/address.css" />
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,jqPlugin/laydate/laydate.js"
        type="text/javascript"></script>
    <!--head fix rgn-->
    <script type="text/javascript">
        $(window).load(function () {
            $("#J_CartSwitch li").hover(function () {
                $("#J_FilterBar .floater").animate({ left: 134 * ($(this).index()) + 'px' }, 100);
            }, function () {
            })
            .click(function () {
                $("#J_CartSwitch .current").removeClass("current");
                $(this).addClass("current");

                //                    doToPageNm();
            });
            $("#J_CartSwitch").hover(function () { }, function () {
                $("#J_FilterBar .floater").animate({ left: 134 * ($("#J_CartSwitch .current").index()) + 'px' }, 100);
            });

            $("#J_SmallSubmit").click(function () {
                ShowForm();
            });
            $("#bntGetCash").click(function () {
                ShowGetCashForm();
            });
        });

        $(function () {
//            $("#zonelistshow li").live("click", function () { if ($(this).hasClass("tb-selected")) { $(this).removeClass("tb-selected") } else { $(this).addClass("tb-selected"); } });

            $(".thead-tbl-address").live("mouseover", function () { $(this).addClass("address-hover").find(".implicit").removeClass("hide"); }).live("mouseout", function () { $(this).removeClass("address-hover").find(".implicit").removeClass("hide").addClass("hide"); });
        });

        function loadlist(_pNum) {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "doloadlist");

            _jsParam.AddCell("TRADING_SID", $('#txts').val());
            _jsParam.AddCell("INITIAL_DT_S", $("#txtINITIAL_DT_S").val());
            _jsParam.AddCell("INITIAL_DT_E", $("#txtINITIAL_DT_E").val());
            _jsParam.AddCell("NEW_PAGE_NUM", _pNum || $("#Ratecurrpage").val());
            _jsParam.AddCell("PAGE_ROW_COUNT", "20");
            _jsParam.AddCell("PAGE_ROW_SORT", "");

            ajaxComm(_jsParam);
        };
        function updateTableHtml(_data) {
            var tpl = HtmlUtil.htmlDecode(document.getElementById('list_temp').innerHTML);
            laytpl(tpl).render(_data, function (render) {
                $("#loadlist").empty().html(render);
            });
            $("#Ratecurrpage").val(_data.page);
            createPaging('ratepaginator', _data.page, _data.total, function (_topagenum) { loadlist(_topagenum); });

        };
        var layerform;
        function ShowForm() {
            $.ploadFile("layer", function (script, textStatus) {
                layerform && layer.close(layerform);
                layerform = $.layer({
                    type: 1,
                    shade: [0],
                    fix: true,
                    title: '输入要充值的金额',
                    maxmin: false,
                    page: { dom: '#ScoreSetBox' },
                    area: ['480px', '280px']
                });
            });
        };
        function dochongzhi() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "dochongzhi");
            _jsParam.AddCell("txtSetScoreQty", $("#txtSetScoreQty").val());
            ajaxComm(_jsParam); //调用页面回调，并传入参数
        };
//        var layerform;
        function ShowGetCashForm() {
            jQuery.getValidateImg('J_CheckCodeContainer');
            $.ploadFile("layer", function (script, textStatus) {
                layerform && layer.close(layerform);
                layerform = $.layer({
                    type: 1,
                    shade: [0],
                    fix: true,
                    title: '输入要提现的金额',
                    maxmin: false,
                    page: { dom: '#GetCashBox' },
                    area: ['480px', '280px']
                });
            });
        };
        function dobtnGetCashAmt() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "dobtnGetCashAmt");
            _jsParam.AddCell("txtGetCashAmt", $("#txtGetCashAmt").val());
            _jsParam.AddCell("TRADING_PSW", $("#txtTRADING_PSW").val());
            _jsParam.AddCell("VALIDATE_CDE", $("#txtVALIDATE_CDE").val());
            ajaxComm(_jsParam); //调用页面回调，并传入参数
        };
    </script> 
    <style>
    
.cart-filter-bar {
	overflow: hidden;
	font-size: 12px;
	position: relative
}

.cart-filters {
	overflow: hidden;
	float: left;
	display: none
}

.cart-filters li {
	float: left;
	margin-right: 25px;
	display: none
}

.cart-filters li a {
	display: block;
	color: #404040;
	_float: left
}

.cart-filters li a:hover {
	text-decoration: none
}

.cart-filters .active {
	padding-right: 15px;
	background-position: 100% -375px;
	margin-right: 30px;
	display: block
}

.cart-filters .active a {
	color: #696969;
	font-weight: 700;
	background-position: -257px -345px;
	padding-left: 15px
}

.cart-filter-bar .cart-sum {
	position: absolute;
	right: 0;
	top: 0;
	height: 25px;
	line-height: 25px;
	font-size:16px;
}

.cart-sum .price {
	font-family: Arial,Verdana;
	font-weight: 700;
	margin-right: 5px;
	color: #f40
}

.cart-sum .price em {
	font-family: Verdana,Arial;
	padding-left: 2px;
	font-weight: 700
}

.cart-sum .submit-btn {
	display: inline-block;
	width: 55px;
	color: #fff;
	background: #f40;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	-ms-border-radius: 2px;
	border-radius: 2px;
	text-align: center;
	cursor: pointer;
	text-decoration: none
}

.cart-sum .submit-btn:hover {
	background: #f22d00
}

.cart-sum .combine-not-supported,.cart-sum .submit-btn-disabled,.cart-sum .submit-btn-disabled:hover {
	background: #e5e5e5;
	color: #9c9c9c;
	cursor: not-allowed
}

.cart-sum .combine-not-supported {
	width: 100px
}
.switch-cart {
	overflow: hidden;
	height: 33px
}

.btn-switch-cart {
	float: left;
	font-weight: 700;
	font-size: 16px;
	height: 16px;
	width:134px;
	line-height: 1.1;
	font-family: 'Hiragino Sans GB','Lantinghei SC','Microsoft Yahei',SimSun;
	text-align: center;
	padding: 0 0 15px;
	cursor: pointer;
	margin-left: -1px
}

.btn-switch-cart a {
	padding-left: 25px;
	text-decoration: none
}

.btn-switch-cart .pipe {
	width: 1px;
	height: 12px;
	display: inline-block;
	background: #e8e8e8
}

.switch-cart-4 .pipe {
	display: none
}

.switch-cart-0 a {
	padding-left: 15px
}

.btn-switch-cart a:hover {
	color: #3c3c3c
}

.switch-cart .current a em {
	color: #f40
}

.btn-switch-cart .number {
	color: #f40;
	font-size: 14px;
	margin: 0 30px 0 5px;
	font-weight: 400
}

.switch-cart .disabled,.switch-cart .disabled a {
	cursor: not-allowed
}

.wrap-line {
	clear: both;
	background: #e6e6e6;
	height: 2px;
	position: relative
}

.wrap-line .floater {
	background: #f40;
	height: 2px;
	width: 0;
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden
}

    </style>
</head>
<body>
    <input type="hidden" id="Ratecurrpage" value="1">
    <input type="hidden" id="txts" value="">
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoDealerHtml("商户管理")%>
        <div id="content" class="content" style=" padding-top: 3px;">
            <div class="page lang-zh-S">
                <div id="mytaobao-panel" class="grid-c2">
                    <div class="col-main" id="J_Col_Main" style="padding-bottom: 0;">
                        <div class="bought">
                            <div class="main-wrap">




     <div id="J_FilterBar" class="cart-filter-bar">
         <ul id="J_CartSwitch" class="switch-cart">
             <li class="btn-switch-cart switch-cart-0 current"><a href="/c_MyChargeLedgerLog.htm?s="
                 class="J_MakePoint" ><em>全部记录</em><span class="number" id="emD1">0</span><span
                     class="pipe"></span></a></li>
                     <li class="btn-switch-cart switch-cart-2 "><a
                         href="/c_MyChargeLedgerLog.htm?s=0" class="J_MakePoint" ><em>待支付</em><span
                             class="number" id="emD2">0</span><span class="pipe"></span></a></li>
                             <li class="btn-switch-cart switch-cart-3 ">
                                 <a href="/c_MyChargeLedgerLog.htm?s=1" class="J_MakePoint" ><em>已支付</em><span
                                     class="number" id="emD3">0</span><span class="pipe"></span></a></li>
                             <li class="btn-switch-cart switch-cart-4 ">
                                 <a href="/c_MyChargeLedgerLog.htm?s=2" class="J_MakePoint" ><em>已取消</em><span
                                     class="number" id="emD4">0</span><span class="pipe"></span></a></li>
                                     </ul>
         <div class="cart-sum">
             账户余额：<strong class="price">￥<em id="J_SmallTotal">0.00</em></strong><a id="J_SmallSubmit" class="submit-btn" >充&nbsp;值</a>
             &nbsp;<a id="bntGetCash" class="submit-btn" >提&nbsp;现</a></div>
         <div class="wrap-line">
             <div class="floater" style="width: 134px; left: 0px;">
             </div>
         </div>
     </div>







                                <h2 class="h2-single">
                                    <span class="entity" id="J_DeliverTitle">更多查询条件</span></h2> 
          <div id="divCondition" style="margin: 3px; border-style: solid; border-width: 0px;
                border-color: #C8D2E0; background-color:#fff; padding:3px; font-size:14px;">
                <table border="0" cellpadding="0" cellspacing="0" style="float:right;"> 
                    <tr>
                        <td width="100px" align="right" style=" padding-right:5px;">
                            交易时间起 </td>
                        <td align="right" width="110px">
                            <input class="" id="txtINITIAL_DT_S" type="text" value="" style="width:150px;height:24px;" onclick="laydate()"/>
                        </td> 
                        <td class="label" width="100px" align="right" style=" padding-right:5px;">
                            交易时间止 </td>
                        <td class="label" width="100px" align="right">
                           <input class="" id="txtINITIAL_DT_E" type="text" value="" style="width:150px;height:24px;" onclick="laydate()"/>
                        </td> 
                        <td align="center" style=" padding-left:20px;">
                           
                        <input class="btn btn-mini btn-danger" id="btnFinder"  type="button" onclick="javascript:loadlist();return false;" value="查询"/>
                        
                                </td>
                    </tr>
                </table>
                <div style="clear:both;"></div>
            </div>
                                <h2 class="h2-single">
                                    <span class="entity"  >收支账单列表</span></h2> 
                                <div class="tbl-deliver-address" style=" background-color:#ffffff;"> 
                                    <div id="loadlist">
                                    </div> 
                                    <div id="ratepaginator"></div>
                                </div>
                            </div>
                            <span class="mytaobao-rc-bt"><span></span></span>
                        </div>
                    </div>
                    <!-- end col-main -->
                    <div class="col-sub" id="J_Col_Sub">
                        <%=new msBsc.WebUi.Code.QtHtmlGet().GetCustomMenu()%>
                    </div>
                    <div style="clear:both;"></div>
                </div>
                <!-- end mytaobao-panel -->
            </div>
        </div>
        <!-- template --> 
        <textarea id="list_temp" style="display: none;">  
        
        <table border="0" cellspacing="0" cellpadding="0" class="tbl-main">
            <colgroup>
                <col  style="width:130px;">
                <col  style="width:210px;">
                <col  style="width:50px;">
                <col  style="width:66px;">
                <col  style="width:66px;">
                <col  style="width:110px;">
                <col  style="width:66px;">
                <col  style="width:110px;">
            </colgroup>
            <tbody >
            <tr class="thead-tbl-grade">
                <th >
                    交易单号
                </th>
                <th >
                    订单名称
                </th>
                <th >
                    收入/支出
                </th>
                <th >
                    交易类型
                </th>
                <th >
                    资金来源
                </th>
                <th >
                    交易状态
                </th>
                <th >
                    价值金额
                </th>
                <th >
                    交易时间
                </th> 
            </tr>   
            {{# for(var i = 0, len = d.rows.length; i < len; i++){ }}
            <tr class="thead-tbl-address ">
                <td>
                    {{ d.rows[i].TRADING_NO }}
                </td>
                <td>
                      {{ d.rows[i].TRADING_NME }}
                </td>
                <td>
                      {{ d.rows[i].PAY_DIR }}
                </td>
                <td>
                    {{ d.rows[i].TRADING_TYPE_CID }}
                </td>
                <td>
                     {{ d.rows[i].CHARGE_SRC_CID }}
                </td>
                <td>
                      {{ d.rows[i].TRADING_SID }}
                      {{#if(d.rows[i].TRADING_SID=='待支付'&&d.rows[i].TRADING_TYPE_CID=='充值'){}}
                      <a class="note  " href="/Alipay/default.aspx?ID={{ d.rows[i].CHARGE_TRADING_ID }}"  target="_blank">立即付款</a>
                      {{#}}}
                      {{#if(d.rows[i].TRADING_SID=='待支付'&&d.rows[i].TRADING_TYPE_CID=='购物'){}}
                      <a class="note  " href="/c_PayCashier.htm?ID={{ d.rows[i].TRADING_NO }}" target="_blank" >立即付款</a>
                      {{#}}}
                </td>
                <td>
                      {{#if(d.rows[i].PAY_DIR=='支出'){}}
                      -
                      {{#}}}
                      {{ d.rows[i].TRADING_AMT }}
                </td>
                <td>
                      {{ d.rows[i].INITIAL_DT }}
                </td> 
            </tr> 
            {{# } }}      
                </tbody>
            </table>
        </textarea>
        <div id="ScoreSetBox" style="width: auto; display: none;padding:30px; ">
            <table border="0" cellpadding="0" cellspacing="0" style="float: right; line-height: 35px; font-size:18px;">
                <tr>
                    <td width="150px" align="right" style="padding-right: 5px;">
                        输入充值金额:
                    </td>
                    <td align="right" width="200px">
                        <input class="" id="txtSetScoreQty" type="text" value="" style="width: 200px; height: 24px;" />
                    </td>
                    <td align="center" style="padding-left: 8px;">
                    </td>
                </tr> 
            </table>
            <div>
                <center>
                    <input type="button" class="btn btn-mini btn-danger" onclick="javascript:dochongzhi();return false;"
                        value="确定" id="dobtnSetScore"  />
                </center>
            </div> 
        </div>
        <div id="GetCashBox" style="width: auto; display: none;padding:30px; ">
            <div style=" padding:10px;color:#c40000; font-size:14px; padding-left:30px; margin-top:-20px; "><p>* 提现前请先设置交易密码！</p></div>
            <table border="0" cellpadding="0" cellspacing="0" style="float: right; line-height: 35px; font-size:18px;">
                <tr>
                    <td width="150px" align="right" style="padding-right: 5px;">
                        输入提现金额:
                    </td>
                    <td align="right" width="200px">
                        <input class="" id="txtGetCashAmt" type="text" value="" style="width: 200px; height: 24px;" />
                    </td>
                    <td align="center" style="padding-left: 8px;">
                    </td>
                </tr> 
                <tr>
                    <td width="150px" align="right" style="padding-right: 5px;">
                        输入交易密码:
                    </td>
                    <td align="right" width="200px">
                        <input class="" id="txtTRADING_PSW" type="password" value="" style="width: 200px; height: 24px;" >
                    </td>
                    <td align="center" style="padding-left: 8px;">
                    </td>
                </tr> 
                <tr>
                    <td width="150px" align="right" style="padding-right: 5px;"> 
                    验 证 码:
                    </td>
                    <td align="right" width="200px" colspan="2">
                        <input class="" id="txtVALIDATE_CDE" type="text" value="" style="width: 98px; height: 24px;float:left;" /> 
                    <div id="J_CheckCodeContainer" class="checkcode-container" style="width: 100px; height: 28px;float:left;" title="请输入验证码！"></div>
                    </td>
                </tr> 
            </table>
            <div style=" margin-top:50px;">
                <center>
                    <input type="button" class="btn btn-mini btn-danger" onclick="javascript:dobtnGetCashAmt();return false;"
                        value="确定" id="dobtnGetCashAmt"  />
                </center>
            </div> 
        </div>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
    <!-- foot script -->
</body>
</html>
